home *** CD-ROM | disk | FTP | other *** search
- .so psroff.inc # Include the macros needed for output to Postscript
- .TH Import-Lightwave
- .SH NAME
- imp_lightwave \- Lightwave geometry import filter
- .SH SYNOPSIS
- .PP
- This man page describes the options specific to the Lightwave geometry
- import converter.
- .PP
- .SH EXAMPLE CONVERSION SYNTAX
- .PP
- To convert a Lightwave file to Wavefront using the default parameters listed
- in the setup.ini file:
- .IP
- pt -i lw -o wave filename.lw
- .PP
- To convert a Lightwave file to VRML and override some of the default options
- in setup.ini:
- .IP
- pt -i lw -in-lw-print-stats = yes -o vrml filename.lw
- .PP
- .SH OVERVIEW
- .PP
- This geometry import converter reads in Lightwave binary object files (.lw)
- and ASCII scene files (.scn). In addition to its core import capabilities,
- the converter can also reconstruct scene hierarchy using information gleamed
- from the scene file and accurately create texture coordinates for the object
- data from the input texture projections. It is the second most complex
- import converter, next to that of the 3D Studio reader - it handles
- all Lightwave geometry attributes (including texture coordinates),
- all shading and texture mapping options, and the various Lightwave
- texture projection methods.
- .PP
- A nice feature of the converter is that it will use object instancing to
- reduce the size of the imported scene. For example, if the Lightwave scene
- file references a Lightwave object 10 times then the converter will only
- read in and store the basis geometry for the referenced object once. All
- other references to the file will create instances of the object (in
- other words, "virtual" objects); this is a benefit of the object/instancing
- capabilities of the converter's internal database.
- .PP
- Some of the features of the converter include:
- .PP
- .IP
- 1. Reading of all Lightwave supported polygon geometry,
- .IP
- 2. Ability to break apart each Lightwave object according to the materials assigned to
- each polygon,
- .IP
- 3. Objects which are instanced one or more times within Lightwave (cloned) are likewise
- instanced within NuGraf. Thus, much memory is saved since only one true copy
- of the raw geometry is stored in memory for each of the instances.
- .IP
- 4. The object hierarchy within the original Lightwave file is recreated exactly within
- NuGraf.
- .IP
- 5. All cameras and lights types are supported.
- .IP
- 6. Every surface (material) attribute is mapped to equivalent NuGraf surface attributes.
- .IP
- 7. All texture mapping types are supported (diffuse, specular, spherical environment
- mapping, etc).
- .IP
- 8. All of the Lightwave texture projection methods are supported, including planar,
- spherical, cylindrical and cubical. These projection methods are converted directly to
- equivalent NuGraf projection methods. The conversion is exact, so the textures
- should appear faithfully when rendered within NuGraf or when the data is exported to
- another file format (such as 3D Studio, VRML or Wavefront).
- .IP
- 9. An IFF image format reader has been added to the NuGraf software so that it can
- directly read in the Lightwave IFF-formatted texture maps.
- .PP
- As some background information, Lightwave uses two types of files to describe
- a scene:
- .IP
- 1. The raw geometry for each object is stored in a separate file called a
- Lightwave Object File. Normally it has a file extension of .lw, .lwb, .lwobj
- or sometimes no extension at all. These files are binary and cannot be viewed
- directly with a text editor.
- .IP
- 2. The scene setup description file is stored in a single file called a
- Lightwave Scene File; it lists the Lightwave binary object files (see
- above) which are to be read into the scene. Normally it has a file extension
- of .scene, .scn or it must use a descriptive filename such as
- "Load Up The Entire Scene". This file is human readable and can be edited
- with a normal text editor.
- .PP
- Due to the fact that many Lightwave scene files originated on the Amiga
- you will have to perform some hand editing of the files before they can be
- loaded. In particular you should perform the following changes to the files:
- .IP
- 1. Copy any "brushes" (or "textures" in NuGraf lingo) used by the Lightwave
- scene to the NuGraf texture directory. The textures are probably in the IFF
- file format (with extensions .IFF, .MAP or .COL) so you must first rename
- the file extension to .IFF then use a paint program (such as Adobe PhotoShop)
- to convert the texture files to TIFF format (which is expected by this converter).
- .IP
- 2. If not using Windows NT or Windows 95 then change the filenames of all Lightwave
- files to have a maximum length of 8 characters.
- .IP
- 3. Change the file extension of the Lightwave scene file to .scn.
- .IP
- 4. Change the file extension of the Lightwave object files to .lw.
- .IP
- 5. Edit the main Lightwave scene with a text editor and modify the filepath and
- filename after each occurrence of the "LoadObject" keyword. For example, the
- original filepath may look something like "LoadObject HD1:Bottle/ExampleBottle".
- This should be changed, for example, to "bottle.lw".
- .PP
- Once these changes have been made invoke the geometry converter and import
- the Lightwave scene file (.scn). If no scene file exists for the scene
- then directly import each Lightwave object file (.lw) one-by-one.
- .PP
- .SH NOTES
- .IP
- 1. Texture files are expected to be in TIFF format by this converter although
- you are free to edit the imported scene to use any other format for the textures.
- .IP
- 2. If an object has more than one surface applied to it then the converter will
- explode the object into separate pieces, each with a single surface assigned to it.
- .IP
- 3. A valiant attempt is made to map Lightwave surface attributes to equivalent NuGraf
- surface attributes but it will probably not be perfect due to the differences between the
- two programs.
- .IP
- 4. Lightwave allows a different texture projection type to be assigned to each texture
- applied to a surface (ie: spherical for the color texture, cylindrical for the bump texture).
- NuGraf only allows one, so it chooses the first texture projection type assigned to the
- surface.
- .IP
- 5. The "smoothing angle" specified with the '-in-lw-smoothing-angle' option
- will be overridden on an object-by-object basis if a surface definition has a
- "smoothing angle" associated with it.
- .IP
- 6. "Detail" polygons are created as separate polygons. This might cause problems when
- rendered with NuGraf.
- .PP
- .SH COMMAND LINE OPTIONS
- .PP
- The following options are specific to this import converter:
- .TP
- -i lw
- This is the optional command line option which specifies that the input data
- is in one of the Lightwave file formats. If not specified then the converter
- will try to guess the input file's format from its file extension
- (.lw, lwobj, .lws, etc) and then from the contents of its file.
- .TP
- -in-lw-break-apart-by-surf-name = [ yes | no ]
- If set to 'yes' then each imported Lightwave object will be exploded into
- separate objects based on the surfaces currently assigned to the object.
- For example, if a single object has surfaces 'surf1', 'surf2' and 'surf3'
- assigned to it then the object will be exploded into 3 sub-objects with
- an appropriate name for each new object. If set to 'no' then the object
- will not be exploded. The default is 'yes'.
- .TP
- -in-lw-compute-normals = [ yes | no ]
- If set to 'yes' then new vertex normals will be computed for a polygon
- if it does not have any vertex normals already. The smoothing criterion is
- based on the angle between abutting polygons; common smoothed vertex normals
- will be computed if the angle between their geometric surfaces normals is
- less than the '-in-lw-smoothing-angle' angle described below. If set to
- 'no' then no new vertex normals will be created.
- .TP
- -in-lw-debug = [ yes | no ]
- If 'yes' then verbose parsing information will be output to the file ASCII
- 'debuglw.txt' located within the current working directory. The default
- is 'no'.
- .TP
- -in-lw-smoothing-angle = #
- This option sets the cut-off smoothing angle (in degrees) used by the vertex normal
- computation algorithm. If the angle between two abutting polygons is greater
- than this number then no smoothing will occur (a crease will be evident
- between the two polygons), else smoothing will occur where the polygons
- meet. The default angle is 30 degrees. If a Lightwave object file (.lw)
- specifies a smoothing angle then that angle will override the angle
- specified in this option (but only for a specific object).
- .TP
- -in-lw-print-stats = [ yes | no ]
- If this option is set to 'yes' then the converter will report the
- number of polygons and vertices read from the file.